Repository navigation
tools: one platform-independent wasi-sysroot on every host, OpenSSL's fixed prefix, and release-only tables - #25
Merged
Merged
Conversation
added 3 commits
November 16, 2026 21:27
…lease builds webcpp.size-table requires <variant>release, which its manifests and their programs inherit whatever the command asks for, and gives variants.py the variant, which refuses any other. libs/hash moves to the commit whose bench/collect.py refuses a program not built at variant=release, and data whose build is not variant=release; tools/test/hash_collect_test.py checks it.
…SL built with one fixed prefix wasi-sdk's per-host archives carry a sysroot and compiler-rt builtins of their own build, whose libc++abi keeps __FILE__ strings with the paths of the machine that built it, so a WASI program differed between macOS and Linux. tools/ci/actions/wasi-sdk/install.sh keeps the runner's clang and tools and replaces the sysroot and the builtins with the release's platform-independent wasi-sysroot-34.0 and libclang_rt-34.0, each pinned by its SHA-256, and fails on a target those lack builtins for. Outside a runner it installs this machine's build, which the README now gives as the local install. OpenSSL kept its temporary build directory as libcrypto's modules and engines directories, a residue of 80 bytes that differed by host and by run. tools/openssl/build.py configures every non-Windows build with the fixed prefix /webcpp-openssl and stages install_dev under DESTDIR. The wasi-sdk recipe changes, so the Linux-X64 prepared bundle must be prepared again before the WASI lanes of the CI can restore it.
…nt wasi-sysroot The preparation run of tools/wasi-sysroot (run 43981425615) published the images whose wasi-sdk bundle holds the three archives the installer reads: wasi-sdk 34.0 for Linux x86_64, wasi-sysroot-34.0 and libclang_rt-34.0.
pinhopro
force-pushed
the
tools/wasi-sysroot
branch
from
November 17, 2026 00:56
c711c0f to
66e5aa3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
One wasi-sysroot on every host
wasi-sdk's per-host archives each carry their own build of the sysroot and of the compiler-rt builtins. The libc++abi in that sysroot keeps
__FILE__strings with the paths of the machine that built it:/Users/runner/work/wasi-sdk/...in the macOS archive,/src/src/...in the Linux one. So the same WASI program differed by host, by 64 bytes in 48 of hash's KDF programs.tools/ci/actions/wasi-sdk/install.shnow works the same way in CI and locally:share/wasi-sysrootandlib/clang/23/lib/wasm32-*with the release's platform-independentwasi-sysroot-34.0.tar.gzandlibclang_rt-34.0.tar.gz, each pinned by its SHA-256.OpenSSL's fixed prefix
With the sysroot shared, the OpenSSL programs still differed by 80 bytes. libcrypto keeps its
--prefixas MODULESDIR and ENGINESDIR, andtools/openssl/build.pyconfigured that prefix inside its random temporary directory, so the bytes changed by host and by run.Every non-Windows build is now configured with
--prefix=/webcpp-openssland staged withmake DESTDIR=... install_dev.Proof: byte-identical WASI programs
hash's 292 WASI measure programs were built from scratch (
-a) on two hosts: macOS arm64, and linux/amd64 in the CI image with this installer. The programs are the space and speed programs of every cell on wasip2 and wasip3, OpenSSL's included.All 292 are byte-identical: the same SHA-256 and the same size on both hosts. For example:
space-hkdf_extract_hash2_hmac_sha2_256on wasip2:ac1c434d...84f5f, 59,161 bytes.space-hkdf_openssl_hmac_sha2_256on wasip3:3574195a...0bc0e15, 2,142,722 bytes.Before this change:
space-hkdf_bearssl_hmac_sha2_256on wasip2 was 69,317 bytes on macOS and 69,253 on Linux.Release-only tables
webcpp.size-tablegives its.sizes.mdthe requirement<variant>release. Its manifests and programs inherit it, whatever variant the command asks for. b2 passes the variant tovariants.py table --variant, which refuses any variant other than release. Before, theasyncifyown lane built asio's size table at debug.bench/collect.py(hash: bench/collect.py builds the throughput table only from release builds hash#3) refuses a program not built atvariant=release, and data whose build is notvariant=release. This PR moveslibs/hashto that commit (624f816, rebased onto hash main 3c9505a), andtools/test/hash_collect_test.pytests it.bench/build.py, which passesvariant=releaseand audits-DNDEBUG. The hash measure lane was retired by hash: every key derivation defaults to backends::hash2; retire the measure lane and tools/hash/measure.py #26.Prepared environments
The installer's recipe changed, so the owner ran the preparation workflow on this branch (run 43981425615). Its verified
ci-environmentsartifact is committed astools/ci/environments.json(66e5aa3).Verification
tools/ci/actions_test.py: four new wasi-sdk cases. They were RED against the old installer, which kept the per-host sysroot.tools/openssl/build_test.py: new prefix case, RED first.tools/test/openssl_test.py: the native and wasip2 source-dependency cases.tools/variants/variants_test.py,tools/test/hash_collect_test.pyandtools/test/emscripten_test.py(the size-table cases): all RED first.tools/ci/environment_test.py,download_cache_test.pyandtools/shipped_sources_test.pypass.tools/lint/lint.shwith wasi-sdk's clang-format and clang-tidy, against the shared sysroot), after rebasing onto main (hash: every key derivation defaults to backends::hash2; retire the measure lane and tools/hash/measure.py #26):lint: clean. clang-tidy is clean over 1,037 translation units, and Pyright is clean.🤖 Generated with Claude Code